Page({
  data: {
    repaireList: {}
  },
  onLoad() {
    this.getRepaireList()
  },
  async getRepaireList() {
    const res = await wx.$http.get('/repair', {
      current: 1,
      pageSize: 10
    })
    if (res.code !== 10000) return wx.$utils.toast('报修列表请求失败')
    this.setData({
      repaireList: res.data
    })
  },
  goDetail(e) {
    console.log(e);
    wx.navigateTo({
      // url: '/repair_pkg/pages/detail/index',
      url: `/repair_pkg/pages/detail/index?id=${e.mark.id}`,
    })
  },
  addRepair() {
    wx.navigateTo({
      url: '/repair_pkg/pages/form/index',
    })
  },
})
